<template>
    <div>
        <h1>管理员登录</h1>
        <el-form  ref="ruleForm" label-width="100px" class="demo-ruleForm">
        <el-form-item label="用户名" >
            <el-input v-model="admins.account"></el-input>
        </el-form-item>
        <el-form-item label="密码" >
            <el-input type="password" v-model="admins.password"></el-input>
        </el-form-item> 
        <el-form-item>
            <el-button type="primary" @click="adminsLogin">登录</el-button>
            
        </el-form-item>
        </el-form>
    </div>
</template>

<script>

import {createNamespacedHelpers} from "vuex"
const { mapActions, mapState } = createNamespacedHelpers("adminsLogin");
export default {
    computed:{
        ...mapState(["admins"])
    },
    methods:{
        ...mapActions(["adminsLogin"])
    }
}
</script>

<style lang="scss">
body,html{
    margin:0
}
#log{
    
    margin:0 auto;
    > .el-container {
    min-height: 100vh;
    a{
      text-decoration: none;
      color:black
    }
  }
}
.el-header, .el-footer {
    background-color: #B3C0D1;
    color: #333;
    text-align: center;
    
  }
  
  .el-aside {
    background-color: #D3DCE6;
    color: #333;
    text-align: center;
    
  }
  
  .el-main {
    background-color: #E9EEF3;
    color: #333;
    text-align: center;
  }
  
  body > .el-container {
    margin-bottom: 40px;
  }
  
  
  /* 表格 */
.el-form{
    width: 350px;
    margin:0 auto
}
</style>